package a.f.j.a;

import a.c.q;
import a.f.j.cb;

import java.util.Iterator;

public class d
  extends c
{
  int[] j;
  public static boolean k;
  
  public d() {}
  
  d(l paraml)
  {
    super(paraml);
  }
  
  boolean b()
  {
    boolean bool3 = c.i;
    boolean bool2 = c.h;
    boolean bool1 = super.b();
    this.j = new int[this.c.length];
    int i = 0;
    do
    {
      do
      {
        if (i >= this.j.length) {
          break;
        }
        this.j[i] = -1;
        i++;
      } while (!bool2);
    } while (bool3);
    return bool1;
  }
  
  int a(k paramk)
  {
    boolean bool2 = c.i;
    boolean bool1 = c.h;
    if (!bool2) {
      if (this.j[paramk.j()] == -1)
      {
        int i = 0;
        if ((bool2) || (paramk.n() != null)) {
          do
          {
            Iterator localIterator = paramk.n().iterator();
            j localj;
            while (locali == localj)
            {
              if (!localIterator.hasNext()) {
                break;
              }
              localj = (j)localIterator.next();
              locale = localj.e();
              locali = locale.a(localj);
              i += locale.m();
            }
            i += a((k)locali);
            e locale = locali.a(locale);
            i += locale.m();
            i locali = locale.a(locali);
            if ((bool2) || (bool2)) {
              break label193;
            }
            if (bool1) {
              break label184;
            }
          } while ((!bool2) && ((!bool1) && (!bool1)));
        }
        if (bool2) {
          break label192;
        }
        this.j[paramk.j()] = i;
      }
    }
    label184:
    label192:
    label193:
    return this.j[paramk.j()];
  }
  
  protected void a(k paramk, int paramInt1, int paramInt2)
  {
    boolean bool2 = c.i;
    boolean bool1 = c.h;
    do
    {
      while (!bool1)
      {
        if (!paramk.f(paramInt2)) {
          break;
        }
        ((f)paramk.a(paramk.b().h(), paramInt1 ^ 0x1, paramInt1)).a(2 + a(paramk));
      }
    } while (bool2);
  }
  
  protected boolean a(k paramk1, k paramk2, e parame)
  {
    boolean bool3 = c.i;
    boolean bool2 = c.h;
    int i = paramk1.j();
    boolean bool1 = false;
    int m = 0;
    int[] arrayOfInt = new int[2];
    boolean[] arrayOfBoolean = new boolean[2];
    k localk = paramk2;
    Object localObject1 = null;
    int n = 0;
    Object localObject2 = localk;
    int i1 = 0;
    this.d[0].b();
    this.d[1].b();
    this.e.b();
    this.e.a(parame);
    int i2 = 0;
    int i3 = 0;
    int i4 = 0;
    label143:
    label233:
    label238:
    label367:
    label368:
    label1015:
    do
    {
      do
      {
        Object localObject5;
        int i5;
        Object localObject6;
        do
        {
          if (bool1) {
            break;
          }
          if ((!bool3) && (m >= 2)) {
            break;
          }
          if (!bool3) {
            if (i3 == 0)
            {
              if (bool3) {
                break label143;
              }
              if (i4 == 0) {
                if (bool3) {
                  break label143;
                }
              }
            }
          }
          i3 = localk.e(i) ? 1 : 0;
          if (!bool3) {}
          arrayOfBoolean[0] = (!localk.i() ? 1 : false);
          arrayOfBoolean[1] = false;
          arrayOfInt[0] = 0;
          arrayOfInt[1] = 0;
          Object localObject3 = null;
          Object localObject4 = null;
          localObject5 = null;
          i5 = 0;
          if (!bool3) {
            if (i3 == 0)
            {
              if (bool3) {
                break label233;
              }
              if (localk.f(i)) {
                a(localk, 1, i);
              }
            }
          }
          i6 = 0;
          do
          {
            if (i6 >= 2) {
              break;
            }
            if (bool3) {
              break label1074;
            }
            if (bool2) {
              break label1073;
            }
            if (arrayOfBoolean[i6] == 0)
            {
              localObject2 = localk;
              i1 = i6;
              if (!bool3)
              {
                if ((i6 == 1) && (i3 == 0))
                {
                  if (bool3) {
                    break label338;
                  }
                  if (localObject1 != null)
                  {
                    localObject3 = localk;
                    i2 = i6;
                    localObject4 = localk.a(i6 ^ 0x1);
                    if (bool3) {
                      break label368;
                    }
                    if (!bool2) {
                      break label367;
                    }
                  }
                }
                localObject4 = localk.a(i6);
                localObject3 = ((e)localObject4).a(localk);
                arrayOfInt[i6] += ((e)localObject4).m();
              }
              else
              {
                arrayOfInt[i6] += a(localk);
              }
              int i7 = 0;
              do
              {
                do
                {
                  do
                  {
                    if (i7 != 0) {
                      break;
                    }
                    if (bool3) {
                      break label1063;
                    }
                    if (arrayOfBoolean[i6] != 0) {
                      break;
                    }
                    if (!bool3) {
                      if ((localObject3 instanceof j))
                      {
                        localObject6 = (j)localObject3;
                        i7 = 1;
                        if (!bool3) {
                          if (i3 != 0)
                          {
                            if (bool3) {
                              continue;
                            }
                            if (i6 != 1) {
                              break label648;
                            }
                            if (bool3) {
                              continue;
                            }
                            if (arrayOfBoolean[0] != 0) {
                              break label648;
                            }
                            if (!bool3)
                            {
                              if (arrayOfInt[0] >= arrayOfInt[1])
                              {
                                a(localk, (i)localObject5, 0, i5, arrayOfInt[0]);
                                arrayOfBoolean[0] = true;
                                if (bool3) {
                                  continue;
                                }
                                if (!bool2) {
                                  break label648;
                                }
                              }
                              localObject4 = ((j)localObject5).a(a((i)localObject2, (i)localObject5, i1, i5 ^ 0x1, arrayOfInt[1]));
                              arrayOfBoolean[1] = true;
                            }
                            if (bool3) {
                              continue;
                            }
                            if (!bool2) {
                              break label648;
                            }
                          }
                        }
                        if ((bool3) || (i6 == 1))
                        {
                          if (!bool3)
                          {
                            if (arrayOfBoolean[0] == 0)
                            {
                              if (bool3) {
                                break label614;
                              }
                              if (arrayOfInt[0] < arrayOfInt[1]) {}
                            }
                            else
                            {
                              arrayOfBoolean[0] = true;
                            }
                          }
                          else
                          {
                            if (bool3) {
                              continue;
                            }
                            if (!bool2) {
                              break label648;
                            }
                          }
                          arrayOfBoolean[1] = true;
                          localObject4 = ((j)localObject5).a(a((i)localObject2, (i)localObject5, i1, i5 ^ 0x1, arrayOfInt[1]));
                          if (bool3) {
                            continue;
                          }
                          if (!bool2) {}
                        }
                        else
                        {
                          localObject4 = a((i)localObject2, (i)localObject6, i1, ((j)localObject6).a((e)localObject4, i6 ^ 0x1), arrayOfInt[0]);
                        }
                        localObject5 = localObject6;
                        i5 = ((j)localObject6).a((e)localObject4, i6 ^ 0x1);
                      }
                    }
                  } while ((!bool3) && ((!bool2) || (!(localObject3 instanceof k))));
                  localObject6 = (k)localObject3;
                  arrayOfInt[i6] += a((k)localObject6);
                  if (bool3) {
                    break label238;
                  }
                  if (bool2) {
                    break;
                  }
                  if (!((k)localObject6).e(i)) {
                    break label797;
                  }
                  m++;
                  arrayOfBoolean[i6] = true;
                  a((i)localObject2, (i)localObject3, i1, ((k)localObject6).a((e)localObject4, 0x1 ^ i2), arrayOfInt[i6]);
                  arrayOfInt[i6] = 0;
                  i4 = 1;
                  if (!bool3) {}
                  i7 = arrayOfBoolean[0] == 0 ? 1 : 0;
                } while ((!bool3) && (!bool2));
                if (!bool3)
                {
                  if (((k)localObject6).g(i))
                  {
                    i2 = ((k)localObject6).a((e)localObject4, i2 ^ 0x1) ^ 0x1;
                    if (!bool3) {
                      if (((k)localObject6).f(i)) {
                        a((k)localObject6, i2, i);
                      }
                    }
                    if (bool3) {
                      break label1050;
                    }
                    if (!((k)localObject6).t().isEmpty())
                    {
                      e locale = ((k)localObject6).x();
                      i1 = i2;
                      if (!bool3)
                      {
                        localObject2 = localObject6;
                        arrayOfInt[i6] = 0;
                        if (i1 == 1)
                        {
                          ((k)localObject6).c(locale);
                          if (bool3) {
                            break label945;
                          }
                          if (!bool2) {
                            break label926;
                          }
                        }
                      }
                      ((k)localObject6).b(locale);
                      localObject4 = locale;
                      this.d[i6].a(locale);
                      if (bool3) {
                        break label1050;
                      }
                      if (i3 != 0)
                      {
                        if (!bool3)
                        {
                          if (i6 == 1)
                          {
                            if (bool3) {
                              break label1003;
                            }
                            if (arrayOfBoolean[0] == 0) {
                              a(localk, (i)localObject5, 0, i5, arrayOfInt[0]);
                            }
                          }
                          if (bool3) {
                            break label1015;
                          }
                        }
                        if (arrayOfBoolean[(i6 ^ 0x1)] == 0) {
                          m++;
                        }
                        arrayOfBoolean[(i6 ^ 0x1)] = true;
                      }
                    }
                  }
                  localObject4 = ((i)localObject3).a((e)localObject4);
                  localObject3 = ((e)localObject4).a((i)localObject3);
                  arrayOfInt[i6] += ((e)localObject4).m();
                }
                if (bool3) {
                  break label1063;
                }
              } while (!bool2);
            }
            i6++;
          } while (!bool2);
        } while ((bool3) || (m >= 2));
        if ((bool3) || (bool2)) {
          break label1454;
        }
        int i6 = arrayOfBoolean[0] == 0 ? 0 : 1;
        if (localObject1 != null)
        {
          if (!bool3) {
            if (n == i6) {
              localObject1.h();
            }
          }
          if (!bool3)
          {
            if (i6 == 0)
            {
              localk.d().b(localObject1.d());
              if (bool3) {
                break label1235;
              }
              if (!bool2) {}
            }
            else
            {
              localk.d().a(localObject1.d());
            }
          }
          else
          {
            if (bool3) {
              break label1235;
            }
            if (!bool2) {}
          }
        }
        else
        {
          if (!bool3)
          {
            if (i6 == 0)
            {
              if (bool3) {
                break label1215;
              }
              localk.c(parame);
            }
          }
          else {
            if (!bool2) {
              break label1213;
            }
          }
          localk.b(parame);
          localk.x();
        }
        this.e.a(this.d[i6]);
        if (!bool3) {
          if (i3 == 0) {
            this.e.e(this.d[(i6 ^ 0x1)]);
          }
        }
        if (!bool3)
        {
          if (((j)localObject5).j() == i)
          {
            bool1 = true;
            Iterator localIterator = this.e.d();
            do
            {
              do
              {
                if (!localIterator.hasNext()) {
                  break;
                }
                localObject6 = (e)localIterator.next();
                ((e)localObject6).b((i)localObject5);
                ((e)localObject6).k();
                if ((!bool3) && (bool2)) {
                  break label1372;
                }
              } while (!bool2);
            } while (bool3);
            if (!bool3)
            {
              if (i5 == 0) {
                ((j)localObject5).d().b(this.e);
              }
            }
            else
            {
              if (bool3) {
                break label1393;
              }
              if (!bool2) {
                break label1384;
              }
            }
            ((j)localObject5).d().d(this.e);
            this.e.b();
            if (bool3) {
              continue;
            }
            if (!bool2) {}
          }
          else
          {
            ((j)localObject5).m();
            localObject1 = localObject5;
            n = i5;
            localk = ((j)localObject5).l();
          }
        }
        else {
          m = 0;
        }
        this.d[0].b();
        this.d[1].b();
      } while (bool3);
    } while (!bool2);
    label338:
    label614:
    label1003:
    label1393:
    return bool1;
  }
  
  public boolean a(cb paramcb)
  {
    this.g = new m();
    if (!c.i) {
      if (super.a(paramcb))
      {
        this.g = new n(paramcb);
        return super.a(paramcb);
      }
    }
    return false;
  }
  
  void d(q paramq)
  {
    boolean bool = c.i;
    this.b = paramq;
    this.g = new m();
    cb localcb = new cb(paramq);
    if (!bool) {
      if (super.a(localcb))
      {
        this.g = new n(localcb);
        b();
        if (bool) {
          return;
        }
        if (!c.h) {
          break label73;
        }
      }
    }
    super.d(paramq);
    label73:
    localcb.i();
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.j.a.d

 * JD-Core Version:    0.7.0.1

 */